<template>
  <div class="dashboard-container">
    <!--    <div class="dashboard-text">name:{{ name }}</div>
    <div class="dashboard-text">roles:<span v-for="role in roles" :key="role">{{ role }}</span></div>
 -->
    <el-row :gutter="24">
      <el-col :span="8">
        <div class="grid-content">
          <el-card class="box-card" style="width: 100%;height: 100%;">
            <div slot="header" class="clearfix">
              <span><strong>注册量面积图</strong></span>
              <el-button style="float: right; padding: 3px 0" type="text">查看详情</el-button>
            </div>
            <userRegisterPlot></userRegisterPlot>
          </el-card>
        </div>
      </el-col>
      <el-col :span="8">
        <div class="grid-content">
          <el-card class="box-card" style="width: 100%;height: 100%;">
            <div slot="header" class="clearfix">
              <span><strong>订单量折线柱状图</strong></span>
              <el-button style="float: right; padding: 3px 0" type="text">查看详情</el-button>
            </div>
            <orderPlot></orderPlot>
          </el-card>
        </div>
      </el-col>
      <el-col :span="8">
        <div class="grid-content">
          <el-card class="box-card" style="width: 100%;height: 100%;">
            <div slot="header" class="clearfix">
              <span><strong>公告栏</strong></span>
              <el-button style="float: right; padding: 3px 0" type="text">查看详情</el-button>
            </div>
            <orderPlot></orderPlot>
          </el-card>
        </div>
      </el-col>
    </el-row>
    <el-row :gutter="24">
      <el-col :span="8">
        <div class="grid-content">
          <el-card class="box-card" style="width: 100%;height: 100%;">
            <div slot="header" class="clearfix">
              <span><strong>注册量面积图</strong></span>
              <el-button style="float: right; padding: 3px 0" type="text">查看详情</el-button>
            </div>
            <userRegisterPlot></userRegisterPlot>
          </el-card>
        </div>
      </el-col>
      <el-col :span="8">
        <div class="grid-content">
          <el-card class="box-card" style="width: 100%;height: 100%;">
            <div slot="header" class="clearfix">
              <span><strong>订单量折线图</strong></span>
              <el-button style="float: right; padding: 3px 0" type="text">查看详情</el-button>
            </div>
            <orderPlot></orderPlot>
          </el-card>
        </div>
      </el-col>
      <el-col :span="8">
        <div class="grid-content">
          <el-card class="box-card" style="width: 100%;height: 100%;">
            <div slot="header" class="clearfix">
              <span><strong>反馈栏</strong></span>
              <el-button style="float: right; padding: 3px 0" type="text">查看详情</el-button>
            </div>
            <orderPlot></orderPlot>
          </el-card>
        </div>
      </el-col>
    </el-row>
    <el-row :gutter="24">
      <el-col :span="24">
        <div class="grid-content">
          <el-card class="box-card" style="width: 100%;height: 100%;">
            <div slot="header" class="clearfix">
              <span><strong>总体记录栏</strong></span>
              <el-button style="float: right; padding: 3px 0" type="text">查看详情</el-button>
            </div>
            <userRegisterPlot></userRegisterPlot>
          </el-card>
        </div>
      </el-col>
    </el-row>
  </div>
</template>

<script>
  import {
    mapGetters
  } from 'vuex'
  import userRegisterPlot from '../cby/plot/userRegisterPlot.vue'
  import orderPlot from '../cby/plot/orderPlot.vue'

  export default {
    name: 'Dashboard',
    components: {
      userRegisterPlot,
      orderPlot,
    },
    computed: {
      ...mapGetters([
        'name',
        'roles'
      ])
    }
  }
</script>

<style rel="stylesheet/scss" lang="scss" scoped>
  .dashboard {
    &-container {
      margin: 30px;
    }

    &-text {
      font-size: 30px;
      line-height: 46px;
    }
  }

  .el-row {
    margin-bottom: 20px;

    &:last-child {
      margin-bottom: 0;
    }
  }

  .row-bg {
    padding: 10px 0;
    background-color: #f9fafc;
  }
</style>
